<!-- HTML header for doxygen 1.8.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/xhtml;charset=utf-8" http-equiv="Content-Type"/>
<meta content="IE=9" http-equiv="X-UA-Compatible"/>
<meta content="Doxygen 1.8.13" name="generator"/>
<title>OpenCV: cv::wechat_qrcode::WeChatQRCode Class Reference</title>
<link href="../../opencv.ico" rel="shortcut icon" type="image/x-icon"/>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script src="../../jquery.js" type="text/javascript"></script>
<script src="../../dynsections.js" type="text/javascript"></script>
<script src="../../tutorial-utils.js" type="text/javascript"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script src="../../search/searchdata.js" type="text/javascript"></script>
<script src="../../search/search.js" type="text/javascript"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
//<![CDATA[
MathJax.Hub.Config(
{
  TeX: {
      Macros: {
          matTT: [ "\\[ \\left|\\begin{array}{ccc} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{array}\\right| \\]", 9],
          fork: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ \\end{array} \\right.", 4],
          forkthree: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ \\end{array} \\right.", 6],
          forkfour: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ #7 & \\mbox{#8}\\\\ \\end{array} \\right.", 8],
          vecthree: ["\\begin{bmatrix} #1\\\\ #2\\\\ #3 \\end{bmatrix}", 3],
          vecthreethree: ["\\begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{bmatrix}", 9],
          cameramatrix: ["#1 = \\begin{bmatrix} f_x & 0 & c_x\\\\ 0 & f_y & c_y\\\\ 0 & 0 & 1 \\end{bmatrix}", 1],
          distcoeffs: ["(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \\tau_x, \\tau_y]]]]) \\text{ of 4, 5, 8, 12 or 14 elements}"],
          distcoeffsfisheye: ["(k_1, k_2, k_3, k_4)"],
          hdotsfor: ["\\dots", 1],
          mathbbm: ["\\mathbb{#1}", 1],
          bordermatrix: ["\\matrix{#1}", 1]
      }
  }
}
);
//]]>
</script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js" type="text/javascript"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css"/>
<link href="../../stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<!--#include virtual="/google-search.html"-->
<table cellpadding="0" cellspacing="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../opencv-logo-small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenCV
    <span id="projectnumber">4.5.2</span>
   </div>
   <div id="projectbrief">Open Source Computer Vision</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<script src="../../menudata.js" type="text/javascript"></script>
<script src="../../menu.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow" onkeydown="return searchBox.OnSearchSelectKey(event)" onmouseout="return searchBox.OnSearchSelectHide()" onmouseover="return searchBox.OnSearchSelectShow()">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe frameborder="0" id="MSearchResults" name="MSearchResults" src="javascript:void(0)">
</iframe>
</div>
<div class="navpath" id="nav-path">
  <ul>
<li class="navelem"><a class="el" href="../../d2/d75/namespacecv.html">cv</a></li><li class="navelem"><a class="el" href="../../df/ddf/namespacecv_1_1wechat__qrcode.html">wechat_qrcode</a></li><li class="navelem"><a class="el" href="../../d5/d04/classcv_1_1wechat__qrcode_1_1WeChatQRCode.html">WeChatQRCode</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pro-attribs">Protected Attributes</a> |
<a href="../../d8/d45/classcv_1_1wechat__qrcode_1_1WeChatQRCode-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">cv::wechat_qrcode::WeChatQRCode Class Reference<div class="ingroups"><a class="el" href="../../dd/d63/group__wechat__qrcode.html">WeChat QR code detector for detecting and parsing QR code.</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<p>WeChat QRCode includes two CNN-based models: A object detection model and a super resolution model. Object detection model is applied to detect QRCode with the bounding box. super resolution model is applied to zoom in QRCode when it is small.  
 <a href="../../d5/d04/classcv_1_1wechat__qrcode_1_1WeChatQRCode.html#details">More...</a></p>
<p><code>#include &lt;opencv2/wechat_qrcode.hpp&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a9c0dc4c37646a1a051340d6b0916f388"><td align="right" class="memItemLeft" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d04/classcv_1_1wechat__qrcode_1_1WeChatQRCode.html#a9c0dc4c37646a1a051340d6b0916f388">WeChatQRCode</a> (const std::string &amp;detector_prototxt_path="", const std::string &amp;detector_caffe_model_path="", const std::string &amp;super_resolution_prototxt_path="", const std::string &amp;super_resolution_caffe_model_path="")</td></tr>
<tr class="memdesc:a9c0dc4c37646a1a051340d6b0916f388"><td class="mdescLeft"> </td><td class="mdescRight">Initialize the <a class="el" href="../../d5/d04/classcv_1_1wechat__qrcode_1_1WeChatQRCode.html" title="WeChat QRCode includes two CNN-based models: A object detection model and a super resolution model...">WeChatQRCode</a>. It includes two models, which are packaged with caffe format. Therefore, there are prototxt and caffe models (In total, four paramenters).  <a href="#a9c0dc4c37646a1a051340d6b0916f388">More...</a><br/></td></tr>
<tr class="separator:a9c0dc4c37646a1a051340d6b0916f388"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab09600cbb1a4df4ed5016589eb176ba0"><td align="right" class="memItemLeft" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d04/classcv_1_1wechat__qrcode_1_1WeChatQRCode.html#ab09600cbb1a4df4ed5016589eb176ba0">~WeChatQRCode</a> ()</td></tr>
<tr class="separator:ab09600cbb1a4df4ed5016589eb176ba0"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae74452147f5e294ce5126548738fbcd6"><td align="right" class="memItemLeft" valign="top">std::vector&lt; std::string &gt; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d04/classcv_1_1wechat__qrcode_1_1WeChatQRCode.html#ae74452147f5e294ce5126548738fbcd6">detectAndDecode</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> img, <a class="el" href="../../dc/d84/group__core__basic.html#ga889a09549b98223016170d9b613715de">OutputArrayOfArrays</a> points=<a class="el" href="../../dc/d84/group__core__basic.html#gad9287b23bba2fed753b36ef561ae7346">noArray</a>())</td></tr>
<tr class="memdesc:ae74452147f5e294ce5126548738fbcd6"><td class="mdescLeft"> </td><td class="mdescRight">Both detects and decodes QR code. To simplify the usage, there is a only API: detectAndDecode.  <a href="#ae74452147f5e294ce5126548738fbcd6">More...</a><br/></td></tr>
<tr class="separator:ae74452147f5e294ce5126548738fbcd6"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:aa6b850b2b93f6d44d89c7d4f7501ed34"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; Impl &gt; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d04/classcv_1_1wechat__qrcode_1_1WeChatQRCode.html#aa6b850b2b93f6d44d89c7d4f7501ed34">p</a></td></tr>
<tr class="separator:aa6b850b2b93f6d44d89c7d4f7501ed34"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a id="details" name="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>WeChat QRCode includes two CNN-based models: A object detection model and a super resolution model. Object detection model is applied to detect QRCode with the bounding box. super resolution model is applied to zoom in QRCode when it is small. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a9c0dc4c37646a1a051340d6b0916f388"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9c0dc4c37646a1a051340d6b0916f388">◆ </a></span>WeChatQRCode()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cv::wechat_qrcode::WeChatQRCode::WeChatQRCode </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp; </td>
          <td class="paramname"><em>detector_prototxt_path</em> = <code>""</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp; </td>
          <td class="paramname"><em>detector_caffe_model_path</em> = <code>""</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp; </td>
          <td class="paramname"><em>super_resolution_prototxt_path</em> = <code>""</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp; </td>
          <td class="paramname"><em>super_resolution_caffe_model_path</em> = <code>""</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>&lt;wechat_qrcode_WeChatQRCode object&gt;</td><td>=</td><td>cv.wechat_qrcode_WeChatQRCode(</td><td class="paramname">[, detector_prototxt_path[, detector_caffe_model_path[, super_resolution_prototxt_path[, super_resolution_caffe_model_path]]]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Initialize the <a class="el" href="../../d5/d04/classcv_1_1wechat__qrcode_1_1WeChatQRCode.html" title="WeChat QRCode includes two CNN-based models: A object detection model and a super resolution model...">WeChatQRCode</a>. It includes two models, which are packaged with caffe format. Therefore, there are prototxt and caffe models (In total, four paramenters). </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">detector_prototxt_path</td><td>prototxt file path for the detector </td></tr>
    <tr><td class="paramname">detector_caffe_model_path</td><td>caffe model file path for the detector </td></tr>
    <tr><td class="paramname">super_resolution_prototxt_path</td><td>prototxt file path for the super resolution model </td></tr>
    <tr><td class="paramname">super_resolution_caffe_model_path</td><td>caffe file path for the super resolution model </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="ab09600cbb1a4df4ed5016589eb176ba0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab09600cbb1a4df4ed5016589eb176ba0">◆ </a></span>~WeChatQRCode()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">cv::wechat_qrcode::WeChatQRCode::~WeChatQRCode </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="ae74452147f5e294ce5126548738fbcd6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae74452147f5e294ce5126548738fbcd6">◆ </a></span>detectAndDecode()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt;std::string&gt; cv::wechat_qrcode::WeChatQRCode::detectAndDecode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>img</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga889a09549b98223016170d9b613715de">OutputArrayOfArrays</a> </td>
          <td class="paramname"><em>points</em> = <code><a class="el" href="../../dc/d84/group__core__basic.html#gad9287b23bba2fed753b36ef561ae7346">noArray</a>()</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval, points</td><td>=</td><td>cv.wechat_qrcode_WeChatQRCode.detectAndDecode(</td><td class="paramname">img[, points]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Both detects and decodes QR code. To simplify the usage, there is a only API: detectAndDecode. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">img</td><td>supports grayscale or color (BGR) image. </td></tr>
    <tr><td class="paramname">points</td><td>optional output array of vertices of the found QR code quadrangle. Will be empty if not found. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>list of decoded string. </dd></dl>
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="aa6b850b2b93f6d44d89c7d4f7501ed34"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa6b850b2b93f6d44d89c7d4f7501ed34">◆ </a></span>p</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt;Impl&gt; cv::wechat_qrcode::WeChatQRCode::p</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>opencv2/<a class="el" href="../../d2/d68/wechat__qrcode_8hpp.html">wechat_qrcode.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.6-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 2 2021 11:36:49 for OpenCV by  <a href="http://www.doxygen.org/index.html">
<img alt="doxygen" class="footer" src="../../doxygen.png"/>
</a> 1.8.13
</small></address>
<script type="text/javascript">
//<![CDATA[
addTutorialsButtons();
//]]>
</script>
</body>
</html>
